/* 基金 */
import { useState, useEffect } from 'react';

import { Tabs } from 'antd';
const { TabPane } = Tabs;

import Fund00 from './fund00.js'
import Fund01 from './fund01.js'
import Fund02 from './fund02.js'
import Fund03 from './fund03.js'
import Fund04 from './fund04.js'
import Fund05 from './fund05.js'
import Fund06 from './fund06.js'
import Fund07 from './fund07.js'

export default function Fund() {
  const callback = (key) => {
    console.log(key);
  }

  const [freshcount, setFreshcount] = useState(0);

  return (
    <div>
      <div>{freshcount}</div>
      
      <Tabs defaultActiveKey="1" onChange={callback} destroyInactiveTabPane="true">
        {/* destroyInactiveTabPane : 被隐藏时是否销毁 DOM 结构 */}

        <TabPane tab="查看" key="1">
          <Fund00 freshcount={freshcount} />
        </TabPane>

        <TabPane tab="综合观察" key="2">
          <Fund01 />
        </TabPane>

        <TabPane tab="评测" key="3">
          <Fund02 />
        </TabPane>

        <TabPane tab="历史收益" key="4">
          <Fund03 />
        </TabPane>

        <TabPane tab="历史净值" key="5">
          <Fund04 />
        </TabPane>

        <TabPane tab="业绩表现" key="6">
          <Fund05 />
        </TabPane>

        <TabPane tab="地址导航" key="7">
          <Fund06 />
        </TabPane>

        <TabPane tab="编辑" key="8">
          <Fund07 />
        </TabPane>

      </Tabs>
    </div>
  );
}
